import QtQuick 2.6
import Qt.labs.controls 1.0
import QtQuick.Layouts 1.1
import "../lib"

Navigator {
    id: nav
    title: "新增收货地址"
    submitted: true
    contentHeight: Math.max(iHEIGHT * 12, height)

    View {
        height: iHEIGHT * 5
        width: parent.width
        GridLayout {
            anchors.fill: parent
            anchors.margins: 9 * __factor__
            columns: 2
            Label {
                text: "收货人"
                Layout.alignment: Qt.AlignRight
            }


            TextField {
                Layout.preferredWidth: parent.width * 0.6
            }
            Label {
                text: "手机号码"
                Layout.alignment: Qt.AlignRight
            }


            TextField {

                Layout.preferredWidth: parent.width * 0.6
            }
            Label {
                text: "所在地"
                Layout.alignment: Qt.AlignRight

            }


            TextField {
                Layout.preferredWidth: parent.width * 0.6
                rightPadding:  tb.availableWidth * 1.2
                id: tfaddress
                text: stackView.cache ? stackView.cache : ""
                ToolButton {
                    id: tb
                    anchors.right: parent.right
                    anchors.rightMargin: 1
                    anchors.verticalCenter: parent.verticalCenter
                    text: "选择"
                    onClicked: contentArea.push("../qml/AddressBrowser.qml")
                }
            }
            Label {
                text: "详细地址"
                Layout.alignment: Qt.AlignRight
            }


            TextField {
                Layout.preferredWidth: parent.width * 0.6
            }
        }
    }

}
